//1.请求医院列表,传参的query参数的类型.
export interface getHosListSearchParamsType {
  //这些值和表单的name属性一一对应。
  hoscode?: string;
  hosname?: string;
  hostype?: string;
  provinceCode?: string;
  cityCode?: string;
  districtCode?: string;
  status?: 0 | 1; //字面量类型
}

//2.医院列表请求的返回值的类型

// 定义数据中bookingRule的类型
export interface BookingRuleType {
  cycle: number;
  releaseTime: string;
  stopTime: string;
  quitDay: number;
  quitTime: string;
  rule: string[];
}

// 二、请求医院列表的返回值（data）中content数组中 每一条数据的类型
export interface hospitalListItemsType {
  id: string;
  createTime: string;
  updateTime: string;
  isDeleted: number;
  param: {
    hostypeString: string;
    fullAddress: string;
  };
  hoscode: string;
  hosname: string;
  hostype: string;
  provinceCode: string;
  cityCode: string;
  districtCode: string;
  address: string;
  logoData: string;
  intro: string;
  route: string;
  status: 0 | 1;
  bookingRule: BookingRuleType | null;
}

// 三、请求医院列表的返回值(data)中content的数组类型
export type hospitalListContentType = hospitalListItemsType[];

// 一、axios请求的返回值data中每个数据的类型限制
export interface hospitalListReqReturnType {
  content: hospitalListContentType;
  pageable: {
    sort: {
      sorted: boolean;
      unsorted: boolean;
      empty: boolean;
    };
    pageNumber: number;
    pageSize: number;
    offset: number;
    paged: boolean;
    unpaged: boolean;
  };
  totalElements: number;
  totalPages: number;
  last: boolean;
  first: boolean;
  sort: {
    sorted: boolean;
    unsorted: boolean;
    empty: boolean;
  };
  numberOfElements: number;
  size: number;
  number: number;
  empty: boolean;
}

// 3.请求三级联动返回值类型

// 请求的返回值中每个对象的类型
export interface getProvinceItemType {
  createTime: string;
  dictCode: string;
  hasChildren: boolean;
  id: number;
  isDeleted: number;
  name: string;
  param: object;
  parentId: number;
  updateTime: string;
  value: string;
}

// 请求的返回值的类型
export type getProvinceReturnType = getProvinceItemType[];


// 4.医院详情的返回值类型
export interface hospitalDetailReturnType {
  bookingRule?: BookingRuleType;
  hospital?: hospitalListItemsType;
}
